QuickTime 1.6.1 added five new flags, two constants, and one new function to the text media handler interface. The new flags and constants are defined in "Text Sample Display Flags" , and "Text Atom Types" , respectively. The new function is defined in this section.
The TextMediaSetTextSampleData function allows you to set values before calling the AddTextSample or AddTESample function.
pascal ComponentResult TextMediaSetTextSampleData(
MediaHandler mh,
void *data,
OSType dataType)
The following sample code demonstrates how to use the TextMediaSetTextSampleData function:
short trans = 127;
Point dropOffset;
MediaHandler mh;
dropOffset.h = dropOffset.v = 4
TextMediaSetTextSampleData(mh,(void *)&dropOffset,dropShadowOffsetType);
TextMediaSetTextSampleData(mh,(void *)&trans,dropShadowTranslucencyType);
Note
Be sure to turn on the
dfDropShadow
display flag after you call
AddTextSample
or
AddTESample
. Passing
nil
for the
textColor
parameter in
AddTextSample
or
AddTESample
defaults to black
.
Passing
nil
for the
backColor
parameter in
AddTextSample
or
AddTESample
defaults to white.
| Previous | Chapter Contents | Chapter Top | Next |